home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…stman Always Clicks Twice / ADC Developer CD (1993-01) (''The Postman Always Clicks Twice'')_iso / Dev.CD 199301.iso / Development Platforms / CSMP Digests / csmp-v1-029.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  43.9 KB  |  1,274 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Mon, 23 Mar 92       Volume 1 : Issue 29
  2.  
  3. Today's Topics:
  4.  
  5.     MPW(3.2):CIncludes:CTBUtilities ?
  6.     HELP: Creating Color Foils on a Mac.
  7.     Think C 5.02 multisegm. DA bug???
  8.     Problems installing Object Master
  9.     Book for TCL
  10.     Problems using bison/flex with THINK C
  11.     TCL tool palette code?
  12.     CTB CMChoose question
  13.      Want a preferences-file object? (was Re: Preference files: best way?)
  14.     mounting a remote drive.  Source code request...
  15.     APDA
  16.      Bad F-Line Instruction and MSWORD?
  17.     How do you use ANSI and multitasking under THINK C & System 7.0?
  18.     Think C libraries with Think Pascal projects, how?
  19.  
  20.  
  21. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  22.  
  23. These digests are available (by using FTP, account anonymous, your email
  24. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  25. edu (try skinner.cs.uoregon.edu if that doesn't work).  This is also the home
  26. of the comp.sys.mac.programmer Frequently Asked Questions list.
  27.  
  28. These digests are also available via email.  Just send a note saying that you
  29. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  30. automatically receive each new digest as it is created.
  31.  
  32. The articles in these digests are taken directly from comp.sys.mac.programmer.
  33. They are not edited; all articles included in this digest are in their original
  34. posted form.  The only articles that are -not- included in these digests are
  35. those which didn't receive any replies (except those that give information
  36. rather than ask a question).  All replies to each article are concatenated
  37. onto the original article in the order in which they were received.  Article
  38. threads are not added to the digests until the last article added to the
  39. thread is at least one month old (this is to ensure that the thread is dead
  40. before adding it to the digests).
  41.  
  42. Send administrative mail to mkelly@cs.uoregon.edu.
  43.  
  44. -------------------------------------------------------
  45.  
  46. From: Meessen@slig.ucl.ac.be (Christophe Meessen)
  47. Subject: MPW(3.2):CIncludes:CTBUtilities ?
  48. Date: 17 Feb 92 16:14:30 GMT
  49. Organization: Universite Catholique de Louvain (Belgium)
  50.  
  51. In MPW 3.2 there is a .h file called CTBUtilities.
  52.  
  53. It contains the prototype of a StandardNBP routine which shows a dialog
  54. allowing to choose a name on the network as in the chooser DA.
  55.  
  56. I can't find any specifications for this function in Inside Mac, in MPW
  57. manuals and technical notes. 
  58.  
  59. Is this utility a toolbox function ?
  60.  
  61. Can we use this utility in programs ?
  62.  
  63. What is the compatibility domain of this utility ? 
  64. (it seems to crash Mac si (7.0) but work fine on Classic (7.0) and 
  65. mac plus (7.0) )
  66.  
  67. I realy need this utility. I could write my own but this one would save me
  68. a lot of programming and debuging time!
  69.  
  70. Chris.
  71.  
  72. Meessen@slig.ucl.ac.be
  73.  
  74.  
  75.  
  76. - -------------------------
  77.  
  78. From: beard@ux5.lbl.gov (Patrick C Beard)
  79. Subject:  MPW(3.2):CIncludes:CTBUtilities ?
  80. Date: 21 Feb 92 23:22:07 GMT
  81. Organization: Berkeley Systems, Inc.
  82.  
  83. In article <1992Feb17.161430.8753@info.ucl.ac.be> Meessen@slig.ucl.ac.be (Christophe Meessen) writes:
  84. #In MPW 3.2 there is a .h file called CTBUtilities.
  85. #
  86. #It contains the prototype of a StandardNBP routine which shows a dialog
  87. #allowing to choose a name on the network as in the chooser DA.
  88. #
  89. #I can't find any specifications for this function in Inside Mac, in MPW
  90. #manuals and technical notes. 
  91. #
  92. #Is this utility a toolbox function ?
  93. #
  94. #Can we use this utility in programs ?
  95. #
  96. #What is the compatibility domain of this utility ? 
  97. #(it seems to crash Mac si (7.0) but work fine on Classic (7.0) and 
  98. #mac plus (7.0) )
  99. #
  100. #I realy need this utility. I could write my own but this one would save me
  101. #a lot of programming and debuging time!
  102. #
  103. #Chris.
  104. #
  105. #Meessen@slig.ucl.ac.be
  106.  
  107.  
  108. This is documented in  "Inside the Macintosh Communications Toolbox", in
  109. the Comm Toolbox Utilities chapter. It used to be called "NuLookup"
  110. and is now (according to the MPW 3.2 interfaces) called StandardNBP. The
  111. names have changed, but not the parameters. Until you posted this question,
  112. I didn't know the name had changed. Guess I'm behind in reading release notes.
  113.  
  114. Patrick C. Beard
  115. Berkeley Systems, Inc.
  116.  
  117.  
  118.  
  119. ---------------------------
  120.  
  121. From: mouli@ut-emx.uucp (Chandramouli. V)
  122. Subject: HELP: Creating Color Foils on a Mac.
  123. Date: 18 Feb 92 23:55:09 GMT
  124. Organization: The University of Texas at Austin, Austin, Texas
  125.  
  126. I am interested in creating color foils (transparencies for overhead
  127. projection) using a Mac and a HP plotter.   I was wondering if it is
  128. possible  to  create an output  file  in HPGL (HP Graphics Language) 
  129. format on  any of the  popular  software  packages  like PowerPoint, 
  130. MacDraw or SuperPaint ?
  131.  
  132. Right now I have an  Apple LaserWriter (B/W PostScript) connected to
  133. my Mac and I get only the  PostScript option on the 'print' menu, on
  134. all the software mentioned above.   Do I need to install a driver to
  135. plot the files on the  HP plotter ?     If so, can you please let me
  136. know where it is available, either commercially or public domain ?
  137.  
  138. Thanks in advance !
  139.  
  140. Chandramouli.   mouli@emx.utexas.edu   18 Feb 1992
  141. - -------------------------------------------------------------------
  142. Microelectronics Research Center in the University of Texas at Austin
  143. - -------------------------------------------------------------------
  144.  
  145.  
  146.  
  147. - -------------------------
  148.  
  149. From: derosa@rtsg.mot.com (John DeRosa)
  150. Subject:  Creating Color Foils (Overheads) on a Mac
  151. Organization: Motorola Inc., Cellular Infrastructure Group
  152. Date: Thu, 20 Feb 1992 14:38:26 GMT
  153.  
  154. >I am interested in creating color foils (transparencies for overhead
  155. >projection) using a Mac and a HP plotter.   I was wondering if it is
  156. >possible  to  create an output  file  in HPGL (HP Graphics Language)
  157. >format on  any of the  popular  software  packages  like PowerPoint,
  158. >MacDraw or SuperPaint ?
  159.  
  160. MacPlot by MicroSpot is just what you want.
  161.  
  162. It can drive a large variety of plotters from every application
  163. that I can think of.  We have a HP7550A, "D" sized plotter.
  164. Works fine, lasts a long time.
  165.  
  166. They have at least two versions, Standard and Professional.
  167. The Professional version has drivers for a wider variety of 
  168. plotters (larger "E" sized ones, etc).
  169.  
  170. This works for plotters that are directly connected to the 
  171. mac or for plotters that are "on the network" with 
  172. products like NetSerial by Shiva.
  173. -- 
  174. = Enjoy!     John DeRosa, Motorola, Inc, Digital Cellular Systems    = 
  175. = (thanks)    derosa@rtsg.mot.com    motcid!derosaj@uunet.uu.net     =
  176. = (a 10^6)    uunet!motcid!derosaj   N1111@applelink.apple.com       =
  177.  
  178.  
  179.  
  180. ---------------------------
  181.  
  182. Subject: Think C 5.02 multisegm. DA bug???
  183. From: guelzow@brandonu.ca
  184. Date: 18 Feb 92 09:21:54 CST
  185. Organization: Brandon University, Brandon, Manitoba, Canada
  186.  
  187. Does anybody know anything about a bug in Think C 5.02 (and 4) related to the
  188. header used for deskaccessories?
  189. I am writing a multisegment deskaccessory. I usually cannot make it cause a
  190. system error except in a very specific kind of circumstances:
  191. On an LC (and possibly other machines, but not on a Plus) running system 6.07
  192. without MF (and possibly other system configurations): After the DA has been 
  193. freshly installed, i.e. the computer has not been rebooted since the DA was
  194. moved into the System by DA mover 3.8 or 4.1 and the DA was not already in
  195. the system, selecting the DA from the Apple menu causes an immediate
  196. "illegal instruction" system error: the programme tries to execute an
  197. instruction not in any heap zone but happens to be 2 bytes off the proper
  198. allignment.
  199. This error occurs before any of my instructions are reached, i.e. a
  200. Debugstr call at the beginning of main is never executed.
  201. --
  202. Thanks for any hints I could be given! 
  203. - -----------------------------------------------------------------------------
  204. Andreas Guelzow  Dept. of Mathematics & Comp. Sc. Brandon University MB Canada
  205. Guelzow@BrandonU.Ca
  206.  
  207.  
  208.  
  209. ---------------------------
  210.  
  211. From: Bruce.Hoult@bbs.actrix.gen.nz
  212. Subject: Problems installing Object Master
  213. Date: 19 Feb 92 12:59:24 GMT
  214. Organization: Actrix Information Exchange
  215.  
  216. I've just received my copy of Object Master and it won't run.  Here's
  217. what happens:
  218.  
  219. 1) I've installed Object Master as per the manual instructions, except
  220.    that the file "Project Options" isn't in either the System 6 or System
  221.    7 Preferences Folder on the distribution disk (or anywhere else).
  222.  
  223. 2) Double clicking Object Master brings up a dialog box asking for my
  224.    name and the serial number.  When I enter these, Object Master creates
  225.    a "OBJECT MASTER(TM) Preferences" file in the Preferences Folder.
  226.  
  227. 3) It then just sits there for about 5 seconds (and will not respond to
  228.    clicks or attempted <cmd>-O's or anything) and then the program quits.
  229.    Thee are no error messages from either the program or the system.
  230.  
  231. 4) Subsequent attempts to run Object Master have the same effect, except
  232.    that it does pick up my name (but not the serial number) from the
  233.    "OBJECT MASTER(TM) Preferences" file.
  234.  
  235. Help!
  236.  
  237. I've tried it on both a 10 MB Mac LC (running 7.01 & 7-up) and an 8 MB
  238. Mac IIcx (running Z-7.0 & 7-up) with the same results.  Booting without
  239. extensions doesn't help.
  240.  
  241. -- 
  242. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  243. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  244. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  245. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  246.  
  247.  
  248.  
  249. - -------------------------
  250.  
  251. From: erik@netcom.com (Erik Robertson)
  252. Subject:  Problems installing Object Master
  253. Date: 19 Feb 92 17:26:59 GMT
  254. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  255.  
  256. In article <1992Feb19.125924.29546@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes:
  257. >I've just received my copy of Object Master and it won't run.  Here's
  258. >what happens:
  259. >1) I've installed Object Master as per the manual instructions, except
  260. >   that the file "Project Options" isn't in either the System 6 or System
  261. >   7 Preferences Folder on the distribution disk (or anywhere else).
  262. >2) Double clicking Object Master brings up a dialog box asking for my
  263. >   name and the serial number.  When I enter these, Object Master creates
  264. >   a "OBJECT MASTER(TM) Preferences" file in the Preferences Folder.
  265. >3) It then just sits there for about 5 seconds (and will not respond to
  266. >   clicks or attempted <cmd>-O's or anything) and then the program quits.
  267. >   Thee are no error messages from either the program or the system.
  268.  
  269. The "Project Options" is not needed any more in the final release as far as
  270. I know.
  271.  
  272. The behavior Bruce describes is exactly what happens when you type in the WRONG
  273. SERIAL NUMBER threfore I believe Bruce made a mistake (upper/lower case? :-) )
  274. Otherwise call up acius tech support... (Fax: 408-252-0831)
  275.  
  276. Good luck!
  277. -- 
  278. - -----------------------------------------------------------------------
  279. Erik ROBERTSON                        erik@netcom.com
  280. Mountain View, CA
  281. - -----------------------------------------------------------------------
  282.  
  283.  
  284.  
  285. - -------------------------
  286.  
  287. From: Bruce.Hoult@bbs.actrix.gen.nz
  288. Subject:  Problems installing Object Master
  289. Date: 20 Feb 92 11:29:29 GMT
  290. Organization: Actrix Information Exchange
  291.  
  292. In article <!bdhy7nerik@netcom.com> erik@netcom.com (Erik Robertson) writes:
  293. > The behavior Bruce describes is exactly what happens when you type in the WRONG
  294. > SERIAL NUMBER threfore I believe Bruce made a mistake (upper/lower case? :-) )
  295.  
  296. No, I typed the correct serial number, as supplied with the program.
  297.  
  298. Thanks to Jim Coons (coons%ct46.mrisi%mrsvr@uwm.edu) who emailed me to
  299. say that he'd had the same problem and that Acius had printed an
  300. incomplete serial number on the registration card.  After email to
  301. their AppleLink acount went unanswered for 24 hours I got impatient
  302. and phoned them (It's kinda expensive from here in New Zealand) and
  303. was told to add (in my case) the digits "34" to the end of the printed
  304. serial number.
  305.  
  306. This fixed the problem.
  307.  
  308. Kudos to the Acius tech support person for fixing it within seconds
  309. (once I got through to them), but rotten onions for making the
  310. mistake in the first place and for not answering their email promptly.
  311.  
  312. BTW, I've only played with the program for a few hours, but it looks great
  313. so far!
  314.  
  315. -- 
  316. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  317. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  318. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  319. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  320.  
  321.  
  322.  
  323. ---------------------------
  324.  
  325. From: kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik])
  326. Subject: Book for TCL
  327. Organization: University of Kaiserslautern (Germany)
  328. Date: Wed, 19 Feb 1992 16:16:05 GMT
  329.  
  330. Has anyone heard about a book called
  331.  
  332. Borenstein, Philip
  333. Object-Oriented Programming Manual, 1990 Cupertino, Calif., USA, 
  334. Symantec Corp.
  335.  
  336. ????????????????????????????????????
  337.  
  338. Does it describe TCL better than the manuals? Are there more examples? Is it worth the money (how much?)?
  339.  
  340. Thank you in advance
  341.  
  342.  
  343. |\/|ichael |<emper
  344. University of Kaiserslautern
  345. Germany
  346.  
  347. Disclaimer: ------------------------
  348.             | Rent this space       |
  349.         | (nothing to disclaim) |
  350.             ------------------------
  351.  
  352.  
  353.  
  354. - -------------------------
  355.  
  356. From: swb1_ltd@uhura.cc.rochester.edu (Steve Berkley)
  357. Subject:  Book for TCL
  358. Date: 19 Feb 92 23:45:40 GMT
  359. Organization: University of Rochester - Rochester, New York
  360.  
  361. In <1992Feb19.161605.27486@rhrk.uni-kl.de> kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik]) writes:
  362.  
  363. >Has anyone heard about a book called
  364.  
  365. >Borenstein, Philip
  366. >Object-Oriented Programming Manual, 1990 Cupertino, Calif., USA, 
  367. >Symantec Corp.
  368.  
  369. I'd be interested in finding a good book on TCL as well- I've never
  370. been able to get through the manual, although the new manual with 5.0
  371. is *much* improved....
  372.  
  373.  
  374.  
  375. - -------------------------
  376.  
  377. From: wbridgm@hubcap.clemson.edu (William T. Bridgman)
  378. Subject:  Book for TCL
  379. Date: 20 Feb 92 03:21:51 GMT
  380. Organization: Clemson University
  381.  
  382. kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik]) writes:
  383.  
  384. >Has anyone heard about a book called
  385.  
  386. >Borenstein, Philip
  387. >Object-Oriented Programming Manual, 1990 Cupertino, Calif., USA, 
  388. >Symantec Corp.
  389. >Does it describe TCL better than the manuals? Are there more examples? Is it worth the money (how much?)?
  390. >Thank you in advance
  391. >|\/|ichael |<emper
  392. >University of Kaiserslautern
  393. >Germany
  394.  
  395. >Disclaimer: ------------------------
  396. >            | Rent this space       |
  397. >        | (nothing to disclaim) |
  398. >            ------------------------
  399.  
  400. The Object-Oriented Programming Manual is, in fact, one of the
  401. manuals which I received in my upgrade to THINK C v5.0.  I suspect
  402. if you have the full manual set, it is among them.
  403.  
  404. Tom
  405.  
  406. - ---------------------------------------------------------------------
  407. |  William T. "Tom" Bridgman, M.S.   | wbridgm@hubcap.clemson.edu     |
  408. |  Department of Physics & Astronomy |                                |
  409. |  Clemson University                |"Black Holes under Construction.|
  410. |  Clemson, SC   29634-1911          |       WATCH YOUR STEP!"        |
  411. - ---------------------------------------------------------------------
  412.  
  413.  
  414.  
  415. ---------------------------
  416.  
  417. From: dean@cs.mcgill.ca (Dean NEWTON)
  418. Subject: Problems using bison/flex with THINK C
  419. Date: 19 Feb 92 15:46:36 GMT
  420. Organization: SOCS, McGill University, Montreal, Canada
  421.  
  422. I am a new user of the Mac and THINK C, trying to compile a program using
  423. Bison and Flex, ftp'ed from ftp.apple.com.
  424.  
  425. I try including the ANSI library, and get the following link errors:
  426.  
  427. undefined: alloca
  428. undefined: bcopy
  429. undefined: fileno
  430. undefined: read
  431. code segment too big (ANSI)
  432. data segment too big
  433.  
  434. When I try to include the ANSI-small and unix libraries instead, I get:
  435.  
  436. undefined: alloca
  437. undefined: bcopy
  438. data segment too big
  439.  
  440. What gives?  What does "code/data segment too big" mean?  Where do I get
  441. alloca?
  442.  
  443. I am running on a PowerBook 170, with 8M of virtual memory.  I tried
  444. turning on 32 bit addressing, but that didn't seem to make any difference.
  445.  
  446. Thanks.
  447.  
  448.  
  449.  
  450. - -------------------------
  451.  
  452. From: gtall@ogre.cica.indiana.edu (Gerry Allwein)
  453. Subject:  Problems using bison/flex with THINK C
  454. Organization: Center for Innovative Computing Applications (CICA), Indiana University
  455. Date: 19 Feb 92 17:49:39 GMT
  456.  
  457. In <1992Feb19.154636.29485@cs.mcgill.ca> dean@cs.mcgill.ca (Dean NEWTON) writes:
  458.  
  459. >I am a new user of the Mac and THINK C, trying to compile a program using
  460. >Bison and Flex, ftp'ed from ftp.apple.com.
  461.  
  462. >I try including the ANSI library, and get the following link errors:
  463.  
  464. >undefined: alloca
  465. >undefined: bcopy
  466. >undefined: fileno
  467. >undefined: read
  468. >code segment too big (ANSI)
  469. >data segment too big
  470.  
  471. >When I try to include the ANSI-small and unix libraries instead, I get:
  472.  
  473. >undefined: alloca
  474. >undefined: bcopy
  475. >data segment too big
  476.  
  477. >What gives?  What does "code/data segment too big" mean?  Where do I get
  478. >alloca?
  479.  
  480. You should see alloca.a in the files for Bison. You need to assemble and 
  481. link that in with your program. Not sure about bcopy or data segment
  482. being too big. Maybe the parser you have generated has a lot of stuff.
  483. One thing you might try is to use a compiler directive that puts C string
  484. data in with a code module. I'm sure there is all sorts of Apple Thought
  485. Police policies for not doing that but MPW likes to put them in the global 
  486. data section as a default and that isn't cool at all. So I use the -b2
  487. compiler flag.
  488.  
  489. Gerry
  490.  
  491.  
  492.  
  493. - -------------------------
  494.  
  495. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  496. Subject:  Problems using bison/flex with THINK C
  497. Date: 20 Feb 92 19:00:18 GMT
  498. Organization: Integrated Systems Laboratory, ETH, Zurich
  499.  
  500. In article <gtall.698521779@ogre> gtall@ogre.cica.indiana.edu (Gerry Allwein) writes:
  501. >In <1992Feb19.154636.29485@cs.mcgill.ca> dean@cs.mcgill.ca (Dean NEWTON) writes:
  502. >
  503. >>I am a new user of the Mac and THINK C, trying to compile a program using
  504. >>Bison and Flex, ftp'ed from ftp.apple.com.
  505. >
  506. >>I try including the ANSI library, and get the following link errors:
  507. >
  508. >>undefined: alloca
  509. >>undefined: bcopy
  510. >>undefined: fileno
  511. >>undefined: read
  512. >>code segment too big (ANSI)
  513. >>data segment too big
  514. >
  515. >>When I try to include the ANSI-small and unix libraries instead, I get:
  516. >
  517. >>undefined: alloca
  518. >>undefined: bcopy
  519. >>data segment too big
  520. >
  521. >>What gives?  What does "code/data segment too big" mean?  Where do I get
  522. >>alloca?
  523. >
  524. >You should see alloca.a in the files for Bison. You need to assemble and 
  525. >link that in with your program.
  526.  
  527. There should also be an alloca.c, which is preferable to alloca.a. The .c
  528. version is less efficient, but the .a version tends to break on some C
  529. compilers and Think C prefers C source to Assembler source :-)
  530.  
  531. >Not sure about bcopy 
  532.  
  533. bcopy is a berkleyism that can be reconciled in the civilised world by
  534. including somewhere either:
  535.  
  536. #define bcopy(s1,s2,l) memcpy(s2,s1,l)
  537.  
  538. or
  539.  
  540. void bcopy(s1,s2,l)
  541. void *     s1;
  542. void *     s2;
  543. int     l;
  544. {
  545.     memcpy(s2,s1,l);
  546. }
  547.  
  548. Note that s1 and s2 are *reversed*. I trust your good judgement which version
  549. to use.
  550.  
  551. >or data segment being too big.
  552. >Maybe the parser you have generated has a lot of stuff.
  553.  
  554. Bison and Flex tend to generate tables that can get pretty big. Sorry, no quick
  555. and dirty fixes here. All you can try is to put the Flex file and the Bison
  556. file into separate segments and use Gerry's idea:
  557.  
  558. >One thing you might try is to use a compiler directive that puts C string
  559. >data in with a code module. I'm sure there is all sorts of Apple Thought
  560. >Police policies for not doing that but MPW likes to put them in the global 
  561. >data section as a default and that isn't cool at all. So I use the -b2
  562. >compiler flag.
  563.  
  564. This idea is neat, but unfortunately all of the data gets allocated in the Flex
  565. and Bison files, and sometimes even one of these is too big.
  566.  
  567. A last resort is to take apart the lexical scanner into several flex passes. I
  568. had to do this for a project, but it's a real horror.
  569.  
  570. Matthias
  571.  
  572. - ---
  573. Matthias Neeracher                                      neeri@iis.ethz.ch
  574.       "C'THULHU FOR PRESIDENT
  575.        For people who are tired of voting the LESSER of two evils !"
  576.            -- Greble Dagmar <dagmar@brainiac.raidernet.com>
  577.  
  578.  
  579.  
  580. - -------------------------
  581.  
  582. From: e-sink@uiuc.edu (Eric W. Sink)
  583. Subject:  Problems using bison/flex with THINK C
  584. Date: 20 Feb 92 14:13:44 GMT
  585. Organization: University of Illinois at Urbana-Champaign
  586.  
  587. In <1992Feb19.154636.29485@cs.mcgill.ca> dean@cs.mcgill.ca (Dean NEWTON) writes:
  588.  
  589. >I am a new user of the Mac and THINK C, trying to compile a program using
  590. >Bison and Flex, ftp'ed from ftp.apple.com.
  591.  
  592. >I try including the ANSI library, and get the following link errors:
  593.  
  594. >undefined: alloca
  595. >undefined: bcopy
  596. >undefined: fileno
  597. >undefined: read
  598. >code segment too big (ANSI)
  599. >data segment too big
  600.  
  601. >When I try to include the ANSI-small and unix libraries instead, I get:
  602.  
  603. >undefined: alloca
  604. >undefined: bcopy
  605. >data segment too big
  606.  
  607. >What gives?  What does "code/data segment too big" mean?  Where do I get
  608. >alloca?
  609.  
  610. >I am running on a PowerBook 170, with 8M of virtual memory.  I tried
  611. >turning on 32 bit addressing, but that didn't seem to make any difference.
  612.  
  613. 1.  If you are not, you should be using Think C 5.0
  614. 2.  If your ARE using Think C 5.0, you should turn on far code and far data
  615.     Without these options, there is 32k limit on code segments, and global
  616.     data.
  617. 3.  As someone else suggested, get alloca from the Bison distribution.
  618. 4.  fileno and read are in the unix library.
  619. 5.  I'd recommend using Berkeley Yacc instead of Bison anyway.
  620.  
  621. -- 
  622. Eric W. Sink,  Spatial Analysis and Systems Team
  623. USACERL, P.O. Box 9005, Champaign, IL 61826-9005
  624. 1-800-USA-CERL x449,   e-sink@uiuc.edu
  625.  
  626.  
  627.  
  628. - -------------------------
  629.  
  630. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  631. Subject:  Problems using bison/flex with THINK C
  632. Date: 20 Feb 92 19:34:19 GMT
  633. Organization: Royal Institute of Technology, Stockholm, Sweden
  634.  
  635. .ch> neeri@iis.ethz.ch (Matthias Ulrich Neeracher) writes:
  636.  
  637.    Bison and Flex tend to generate tables that can get pretty big. Sorry, no quick
  638.    and dirty fixes here. All you can try is to put the Flex file and the Bison
  639.    file into separate segments and use Gerry's idea:
  640.  
  641. Upgrade to Think C 5.0 that supports "far data" ?
  642.  
  643.  
  644.      "C'THULHU FOR PRESIDENT
  645.  
  646. Yes ! Yes ! Feel the deep space evil seep into your body, fear tears
  647. your ... oops, wrong group.
  648.  
  649. --
  650. This Signature is distributed under the conditions of the Signature License,
  651. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  652. implies that you accept to be bound by the terms in said License. Should you
  653. not agree on any of these terms, you must return the Signature unread to me.
  654.  
  655.  
  656.  
  657. ---------------------------
  658.  
  659. From: gb2a+@andrew.cmu.edu (George J. Baxter)
  660. Subject: TCL tool palette code?
  661. Date: 19 Feb 92 16:54:30 GMT
  662. Organization: Science & Technology Center, Carnegie Mellon, Pittsburgh, PA
  663.  
  664. Hey!
  665.     I'm fighting to learn TCL, and it's a rather overwhelming task at
  666. times.. for example, I'm trying to create a simple little tool palette,
  667. via creating a subclass of CGridSelector, just like the book sez to do. 
  668. Well, funny thing, it's not receiving any clicks or update events.  Does
  669. anyone have any (basic) suggestions or (basic again) example code I
  670. could see?  Thanks.
  671.     George Baxter
  672. - ---------------------
  673. gb2a@andrew.cmu.edu            baxter@a.cfr.cmu.edu
  674.  
  675. baxter@imga.cfr.cmu.edu            q100gb2a@vb.cc.cmu.edu
  676.  
  677. "Only a Hawaiian can say Humuhumunukunukuapuaa five times fast, correctly."
  678.  
  679.  
  680.  
  681. - -------------------------
  682.  
  683. Subject:  TCL tool palette code?
  684. From: guelzow@brandonu.ca
  685. Date: 20 Feb 92 08:58:26 CST
  686. Organization: Brandon University, Brandon, Manitoba, Canada
  687.  
  688. In article <cdccj6i00WBK43D2o=@andrew.cmu.edu>, 
  689. gb2a+@andrew.cmu.edu (George J. Baxter) writes:
  690. > Hey!
  691. >     I'm fighting to learn TCL, and it's a rather overwhelming task at
  692. > times.. for example, I'm trying to create a simple little tool palette,
  693. > via creating a subclass of CGridSelector, just like the book sez to do. 
  694. > Well, funny thing, it's not receiving any clicks or update events.  Does
  695. > anyone have any (basic) suggestions or (basic again) example code I
  696. > could see?  Thanks.
  697. The Artclass Demo contains an example of a tool palette.
  698. - -----------------------------------------------------------------------------
  699. Andreas Guelzow  Dept. of Mathematics & Comp. Sc. Brandon University MB Canada
  700. Guelzow@BrandonU.Ca
  701.  
  702.  
  703.  
  704. ---------------------------
  705.  
  706. From: Roger.W.Brown@dartmouth.edu (Roger W. Brown)
  707. Subject: CTB CMChoose question
  708. Date: 19 Feb 92 18:18:05 GMT
  709. Organization: Dartmouth College, Hanover, NH
  710.  
  711. The Communications ToolBox Connection Manager has a function called
  712. CMChoose that can be used to configure a connection. The first
  713. parameter is a connection handle. If you pass an existing connection
  714. handle in and the user chooses to use a different type of connection
  715. (say from a Serial to an ADSP tool), CMChoose disposes the original
  716. connection, makes a new one of the chosen type and returns it in the
  717. connection handle parameter, and returns chooseOKMajor. 
  718.  
  719. If the connection handle passed to CMChoose is NIL and the user chooses
  720. a connection other than the one first displayed, CMChoose also returns
  721. chooseOKMajor but does not dispose the original connection (because it
  722. was NIL, so that's ok) and DOES NOT CREATE a new connection of the
  723. chosen type.
  724. It returns a NIL in the connection handle parameter.
  725.  
  726. This is all find except in the following case: The user cannot choose a
  727. new type of tool to use unless one was chosen somehow beforehand and
  728. created. CMChoose does not return any information about which tool was
  729. chosen unless it starts with a connection and creates a new one. The
  730. sample code suggests that you always create some connection first, by
  731. choosing the first one it finds.
  732.  
  733. If the first tool it finds is one that it cannot create (for example a
  734. TCP tool that requires MacTCP to be present but is not present), then
  735. the user has no way to choose another tool within the program. The only
  736. way is to remove that tool fom the extensions folder using the Finder -
  737. a non-intuitive user interface.
  738.  
  739. So, does anyone know how to find out the chosen tool in CMChoose when
  740. there was no connection to begin with? Or some alternative method of
  741. giving the user a choice of tools before creating any one tool. I
  742. realize that another dialog with a list of tool names could be made
  743. easily enough, but that would be a different interface to present to
  744. the user that does not allow configuration of the tool as well.
  745. Confusing.
  746.  
  747. - ---------------------------------------------------------------
  748. Roger Brown                           Roger.W.Brown@dartmouth.edu
  749. Courseware Development
  750. Dartmouth College, Hanover, NH
  751.  
  752.  
  753.  
  754. - -------------------------
  755.  
  756. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  757. Subject:  CTB CMChoose question
  758. Organization: University of Illinois at Urbana-Champaign
  759. Date: Wed, 19 Feb 1992 21:16:12 GMT
  760.  
  761. Roger.W.Brown@dartmouth.edu (Roger W. Brown) writes:
  762. >sample code suggests that you always create some connection first, by
  763. >choosing the first one it finds.
  764. >
  765. >If the first tool it finds is one that it cannot create (for example a
  766. >TCP tool that requires MacTCP to be present but is not present), then
  767. >the user has no way to choose another tool within the program
  768.  
  769. Perhaps tool writers should not do such checking until listen or open time.
  770. Of course, one of the weaknesses of the CTB is that you have to write
  771. to the least common denominator; ie, the stupid tool.
  772.  
  773. How about a loop:
  774.  
  775.   for(i=1;;i++)
  776.   {
  777.     if (CRMGetIndToolName(classCM,1,toolName)) return(WarnUser(NO_CTB_TOOLS));
  778.     if ((procID=CMGetProcID(toolName))>=0 &&
  779.         (CnH = CMNew(procID,flags,bs,nil,nil))) break;
  780.   }
  781. -- 
  782. Steve Dorner, U of Illinois Computing Services Office
  783. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  784.  
  785.  
  786.  
  787. ---------------------------
  788.  
  789. From: brunner@brchh87.bnr.ca (James Brunner)
  790. Subject:  Want a preferences-file object? (was Re: Preference files: best way?)
  791. Date: 19 Feb 92 18:13:40 GMT
  792.  
  793. Jamie, I can't seem to E-mail to you.  But I for one am interested in
  794. a preferences file class.  Could you please E-mail to me or post.
  795.  
  796. By the way, here's my contribution.  The CObject class has an error that
  797. you'll probably never hit, but here it is.  In the routine that returns the
  798. name of a class, they truncate the length to 256 to fit into a Str255
  799. variable.  Like this (from memory so the names may be different):
  800.      length = Min(length,sizeof(Str255));
  801. This should be
  802.      length = Min(length,sizeof(Str255)-1);
  803. or
  804.      length = Min(length,255);
  805.  
  806. (Of course the sizeof a Str255 is 256 because of the addition of the length
  807. byte).
  808. -- 
  809. - -------------------------------------------------------------------------
  810. Jim Brunner - (brunner@brchh87.BNR.CA)
  811. All opinions are my own and have nothing whatsoever to do with BNR, NT,
  812. NTI, Bell Canada, or any of the BCE corporations or affiliates.
  813.  
  814.  
  815.  
  816. - -------------------------
  817.  
  818. From: nick@dcs.ed.ac.uk (Nick Rothwell)
  819. Subject:  Want a preferences-file object? (was Re: Preference files: best way?)
  820. Date: 20 Feb 92 10:40:21 GMT
  821. Organization: Friends of the Salter Duck
  822.  
  823. I've written one already; it's on the THINK C archive machine
  824. (ics.uci.edu), file cpreferences.hqx.
  825.  
  826. Nick.
  827. --
  828. Nick Rothwell, LFCS, Edinburgh | "Chai ch t'chai ch't chnna chnna chnna ch'th
  829.              nick@dcs.ed.ac.uk |  Chai ch t'chai ch't chuth chena chann ch'tt
  830. Mentation Consultancy Services |  Chie ch t'chie ch t'chaaa chn chattr chattr"
  831.    cassiel@cix.compulink.co.uk |       -- Wavestation, V3 software, my dragon.
  832.  
  833.  
  834.  
  835. ---------------------------
  836.  
  837. From: wdburns@mtu.edu (Bill Burns)
  838. Subject: mounting a remote drive.  Source code request...
  839. Date: 19 Feb 92 22:59:04 GMT
  840. Organization: CCLI Macintosh Lab
  841.  
  842. Greetings Net-landers!
  843.  
  844. I am trying to write an application that will eliminate the need for
  845. using "Chooser" to log into our network.  I see that there is a way to
  846. mount disks under system 7.x .  I'm trying to implememt these new routines
  847. using Think C... does anyone have any idea or sample code on how to do this.
  848.  
  849. Any code (either for system 6 or 7) would be appreciated.  I'm familiar
  850. with programming on the mac, but I need some help wrt Sys7 and AppleTalk.
  851.  
  852. Any help would be appreciated....
  853.  
  854. Thanks
  855. Bill Burns (wdburns@mtu.edu)
  856. Machintosh Technical Consultant,
  857. CCLI Lab, MTU
  858.  
  859.  
  860.  
  861. - -------------------------
  862.  
  863. From: tagreen@bronze.ucs.indiana.edu (Todd Green)
  864. Subject:  mounting a remote drive.  Source code request...
  865. Date: 20 Feb 92 21:23:51 GMT
  866. Organization: Indiana University
  867.  
  868. In article <1992Feb19.225904.28549@ctr.columbia.edu> wdburns@mtu.edu (Bill Burns) writes:
  869. >I am trying to write an application that will eliminate the need for
  870. >using "Chooser" to log into our network.  I see that there is a way to
  871. >mount disks under system 7.x .  I'm trying to implememt these new routines
  872. >using Think C... does anyone have any idea or sample code on how to do this.
  873.  
  874. I just finished writting an INIT/application pair that checks to see
  875. if a volume is mounted, and if it isn't the INIT will log into a
  876. server and mount a volume.  It works under both system 6 and 7 using an
  877. XCMD written by someone at Apple and was based on the code in RevRDist.
  878.  
  879. The application allows you to configure the INIT by specifying the
  880. primary volume, backup volume, backup zone, backup server name,
  881. username, and password.  (Of course the password is encrypted).
  882.  
  883. This was to implement a redundancy system for our public clusters at
  884. Indiana University.
  885.  
  886. If anyone is interested in the code/project send me email and as soon
  887. as I clear it with the "higher ups" I'll mail you a copy.  It is
  888. pretty well documented (both in the code and with separate docs), but
  889. is still in its final beta stage.  It has been running for the last
  890. month in our clusters without a hitch.
  891.  
  892. Have a good one,
  893. Todd
  894. P.S. Oh, it's written in THINK C 5.0.2, if that is of importance to
  895. you :)
  896. -- 
  897. - --
  898. Internet: tagreen@bronze.ucs.indiana.edu
  899. NeXTMail: tagreen@marmoset.ucs.indiana.edu
  900. Bitnet:   tagreen@iubacs.bitnet
  901.  
  902.  
  903.  
  904. ---------------------------
  905.  
  906. From: crocker@rtsg.mot.com (Ronald T. Crocker)
  907. Subject: APDA
  908. Organization: Motorola Inc., Cellular Infrastructure Group
  909. Date: Wed, 19 Feb 1992 21:40:39 GMT
  910.  
  911. Can anyone send me the phone number for APDA? (Or, better yet, if this
  912. happens to be a FAQ, send me the FAQ file!)
  913.  
  914. Thanks!
  915.  
  916. -- 
  917. Ron Crocker
  918. Motorola Radio-Telephone Systems Group, Cellular Infrastructure Group
  919. (708) 632-4752 [FAX: (708) 632-4430]
  920. crocker@mot.com or uunet!motcid!crocker
  921.  
  922.  
  923.  
  924. - -------------------------
  925.  
  926. From: vvann@umbio.med.miami.edu (Vince Vann)
  927. Subject:  APDA
  928. Date: 20 Feb 92 01:53:41 GMT
  929. Organization: University of Miami Medical School
  930.  
  931. crocker@rtsg.mot.com (Ronald T. Crocker) writes:
  932.  
  933. >Can anyone send me the phone number for APDA? (Or, better yet, if this
  934. >happens to be a FAQ, send me the FAQ file!)
  935.  
  936. APDA order number is 800-282-2732.
  937.  
  938. --
  939. Vincent Vann
  940. vvann@umbio.med.miami.edu
  941.  
  942.  
  943.  
  944. ---------------------------
  945.  
  946. From: jxs18@po.CWRU.Edu (Jerry Sy)
  947. Subject:  Bad F-Line Instruction and MSWORD?
  948. Organization: Case Western Reserve University, Cleveland, OH (USA)
  949. Date: Thu, 20 Feb 92 03:21:04 GMT
  950.  
  951.  
  952. In a previous article, ptrubey@netcom.com (Phil Trubey) says:
  953.  
  954. >Lately I have been experiencing frequent crashes on my System 7 machine
  955. >while running MS Word v4.  A bomb box will randomly (seemingly) appear that
  956. >says 'Bad F-Line Instruction'.  This is starting to get really annoying, to
  957. >say the least.  Any ideas on what might be causing it (other than
  958. >Word 4?).
  959. >-- 
  960. >
  961. I have been getting this Bad F-Line error messages myself running
  962. Hypercard, MitemView and Omnis.
  963.  
  964. What is BAD F-Line Error ?
  965.  
  966. jerry
  967.  
  968.  
  969.  
  970.  
  971.  
  972. - -------------------------
  973.  
  974. From: gyoungs@isis.cs.du.edu (Greg Youngs)
  975. Subject:  Bad F-Line Instruction and MSWORD?
  976. Organization: University of Denver, Dept. of Math & Comp. Sci.
  977. Date: Thu, 20 Feb 92 03:58:04 GMT
  978.  
  979.  
  980. Frequent crashes in Word 4 with System 7:
  981.  
  982. Try letting Word create a new Word Settings (4) file in the System 
  983. folder (remove, delete the one there).
  984.  
  985. check to see the system passes ResEdit verify.
  986. Run DFA (7.0 of course) on the drive.
  987. Reinstall the system.
  988.  
  989. Figure you have anything from bad scsi to full moon!
  990.  
  991.        The March Hare
  992.  
  993.  
  994.  
  995.  
  996. - -------------------------
  997.  
  998. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  999. Subject:  Bad F-Line Instruction and MSWORD?
  1000. Date: 20 Feb 92 10:57:03 GMT
  1001. Organization: Royal Institute of Technology, Stockholm, Sweden
  1002.  
  1003. .ins.cwru.edu> jxs18@po.CWRU.Edu (Jerry Sy) writes:
  1004.  
  1005.    In a previous article, ptrubey@netcom.com (Phil Trubey) says:
  1006.  
  1007.    >Lately I have been experiencing frequent crashes on my System 7 machine
  1008.    >while running MS Word v4.  A bomb box will randomly (seemingly) appear that
  1009.    >says 'Bad F-Line Instruction'.  This is starting to get really annoying, to
  1010.  
  1011.    What is BAD F-Line Error ?
  1012.  
  1013. It's either a) a program tried to use an FPU that wasn't there or
  1014. b) a program executed an illegal FPU instruction. The usual cause
  1015. is either a program/INIT zapping memory, or a bug that makes the
  1016. program get "off track" and try to execute things that are not
  1017. code.
  1018.  
  1019. --
  1020. This Signature is distributed under the conditions of the Signature License,
  1021. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  1022. implies that you accept to be bound by the terms in said License. Should you
  1023. not agree on any of these terms, you must return the Signature unread to me.
  1024.  
  1025.  
  1026.  
  1027. - -------------------------
  1028.  
  1029. From: Bill Williams
  1030. Subject:  Bad F-Line Instruction and MSWORD?
  1031. Date: 20 Feb 92 17:32:26 GMT
  1032.  
  1033. In article <1992Feb20.032104.27028@usenet.ins.cwru.edu> jxs18@po.CWRU.Edu  
  1034. (Jerry Sy) writes:
  1035. > In a previous article, ptrubey@netcom.com (Phil Trubey) says:
  1036. > >Lately I have been experiencing frequent crashes on my System 7 machine
  1037. > >while running MS Word v4.
  1038.  
  1039. I've been getting the same thing with EXCEL; also a fair number of "illegal  
  1040. instruction" bombs.  Microsoft says it's my other INITs.  Reminds me of an old  
  1041. IBM shiboleth:  "It must be your cards."  So what IS it?
  1042.  
  1043.             -W2
  1044.  
  1045.  
  1046.  
  1047. - -------------------------
  1048.  
  1049. From: bjornl@milton.u.washington.edu (Bjorn Levidow)
  1050. Subject:  Bad F-Line Instruction and MSWORD?
  1051. Organization: University of Washington, Seattle
  1052. Date: Fri, 21 Feb 1992 01:28:40 GMT
  1053.  
  1054. In article <11375@umd5.umd.edu> Bill Williams writes:
  1055.  
  1056. >> >Lately I have been experiencing frequent crashes on my System 7 machine
  1057. >> >while running MS Word v4.
  1058. >
  1059. >I've been getting the same thing with EXCEL; also a fair number of "illegal  
  1060. >instruction" bombs.  Microsoft says it's my other INITs.  Reminds me of an old  
  1061. >IBM shiboleth:  "It must be your cards."  So what IS it?
  1062. >
  1063. >            -W2
  1064.  
  1065. I can get EXCEL to bomb with either an illegal instruction or Bad F-Line error
  1066. if I it is running in less than 1536K under system 7.  If it is running with
  1067. more memory than that, which is the suggested size, then it works just fine.
  1068. I think the problem is that EXCEL doesn't complain if there is too little 
  1069. memory available to launch it.  It launches and then crashes later.  I doubt
  1070. that it is an init problem.
  1071.  
  1072. ===============================================================================
  1073. \  Bjorn Levidow                    |   Romance is unreal...it's the essence  /
  1074. \  Dept. of Psychology      NI-25   |   of life, but not the reality of it.   /
  1075. \  University of Washington         |               ---Robyn Hitchcock        /
  1076. \  Seattle, WA  98195               |   It's mine!  All mine!                 /
  1077. \  bjornl@u.washington.edu          |   I'm independently thoughtful!         /
  1078. ===============================================================================
  1079.  
  1080.  
  1081.  
  1082.  
  1083. ---------------------------
  1084.  
  1085. From: wbridgm@hubcap.clemson.edu (William T. Bridgman)
  1086. Subject: How do you use ANSI and multitasking under THINK C & System 7.0?
  1087. Date: 20 Feb 92 03:31:29 GMT
  1088. Organization: Clemson University
  1089.  
  1090. I am running THINK C under System 7.0 and writing programs using
  1091. the ANSI library which can be ported between the Mac and
  1092. DECstations.  However, I'm growing tired of having to wait for one
  1093. of these programs to finish on the Mac before I can run other
  1094. programs.  The obvious solution is to incorporate some calls to the
  1095. Mac O/S to handle this and place them inside #ifdef THINK_C.
  1096.  
  1097. My question is, how does one go about this?  While I am somewhat
  1098. familiar with the Mac Toolbox, I've not worked with the
  1099. multitasking capabilities.
  1100.  
  1101. Has anyone out there done this, or alternately, is a TechNote
  1102. available which would tell me what I need to know to try and
  1103. implement this capability?
  1104.  
  1105. Thanks...Tom
  1106.  
  1107. - ---------------------------------------------------------------------
  1108. |  William T. "Tom" Bridgman, M.S.   | wbridgm@hubcap.clemson.edu     |
  1109. |  Department of Physics & Astronomy |                                |
  1110. |  Clemson University                |"Black Holes under Construction.|
  1111. |  Clemson, SC   29634-1911          |       WATCH YOUR STEP!"        |
  1112. - ---------------------------------------------------------------------
  1113.  
  1114.  
  1115.  
  1116. - -------------------------
  1117.  
  1118. From: mkahl@world.std.com (Michael Kahl)
  1119. Subject:  How do you use ANSI and multitasking under THINK C & System 7.0?
  1120. Date: 20 Feb 92 17:32:23 GMT
  1121. Organization: Enginuity Inc.
  1122.  
  1123. In article <1992Feb20.033129.15156@hubcap.clemson.edu> wbridgm@hubcap.clemson.edu (William T. Bridgman) writes:
  1124. >I am running THINK C under System 7.0 and writing programs using
  1125. >the ANSI library which can be ported between the Mac and
  1126. >DECstations.  However, I'm growing tired of having to wait for one
  1127. >of these programs to finish on the Mac before I can run other
  1128. >programs.  The obvious solution is to incorporate some calls to the
  1129. >Mac O/S to handle this and place them inside #ifdef THINK_C.
  1130. >
  1131. >My question is, how does one go about this?  While I am somewhat
  1132. >familiar with the Mac Toolbox, I've not worked with the
  1133. >multitasking capabilities.
  1134.  
  1135. All you need to do is set the console mode to "raw" and call getchar.  In raw
  1136. mode, getchar will return right away if nothing has been typed, but it will
  1137. magically take care of processing events and allow your program to be placed
  1138. into the background.  (If you want your program to continue processing while
  1139. in the background, be sure to set the "Background Null Events" flag in the "Set
  1140. Project Type..." dialog box.)
  1141.  
  1142. If you program is computing long enough for it to bother you that you can't
  1143. switch out, it's probably also long enough that the user may need to abort it.
  1144. As long as you're calling getchar, why not test for (say) a ctrl-C?
  1145.  
  1146. Here's some (untested) code:
  1147.  
  1148.     // before beginning a long computation:
  1149.     csetmode(C_RAW, stdin);
  1150.  
  1151.     // at intervals during the computation:
  1152.     if (getchar() == '\3')
  1153.         raise(SIGINT);
  1154.  
  1155.     // afterwards (if desired):
  1156.     csetmode(C_ECHO, stdin);
  1157. -- 
  1158. Michael Kahl, Software Architect, Enginuity Inc.
  1159. mkahl@world.std.com  -or-  75236.3146@compuserve.com
  1160. Disclaimer:  Whoa!  Did I say THAT??!
  1161.  
  1162.  
  1163.  
  1164. ---------------------------
  1165.  
  1166. From: costin@cogsci.ucsd.EDU (Dan Costin)
  1167. Subject: Think C libraries with Think Pascal projects, how?
  1168. Date: 20 Feb 92 05:16:35 GMT
  1169. Organization: Department of Cognitive Science, UCSD
  1170.  
  1171. I'm trying to use a library I created with Think C in a Think Pascal
  1172. project.  Is this possible?  What are the rules?
  1173. Since I had a sprintf in my C code, I had to include ANSI.lib.  But even
  1174. ANSI-small gave me some multiple defines when I included the library
  1175. in Think Pascal (specifically RENAME, __OPEN and __CLOSE).  So I rewrote
  1176. the code using strcpy and strcat and wrote my own itoa and ftoa routines.
  1177. OK, got rid of that problem.  But another conflict I came across is
  1178. that if I included MacTraps I got a whole bunch of conflicts, and if
  1179. I didn't I was missing CtoPstr and NewPtrSys.  So I wrote my own versions
  1180. of those two. Now I get no link errors, but the first call to the
  1181. C library routines bombs.  All the C functions are declared as pascal,
  1182. and I have a unit that tells the Pascal program what the arguments
  1183. look like.
  1184.  
  1185. So why am I bombing?  First thing the C routine does is beep,
  1186. and the beeps come through.  Then a window that's supposed to come up
  1187. does come up (just the border), but then comes a bus error.  
  1188. The C routines work flawlessly
  1189. when used with a C project.  Am I missing something crucial?
  1190. Is there a problem with Pascal providing the glue code for the C
  1191. Toolbox calls?  How do I include the C glue code (which I presume is
  1192. in MacTraps) and not get multiple defines when I include the library in
  1193. Pascal?
  1194.  
  1195. Any pointers to where this type of inter-language communication might
  1196. be described would be much appreciated.  Thanks.
  1197. -dan 
  1198.  
  1199.  
  1200.  
  1201. - -------------------------
  1202.  
  1203. From: siegel@world.std.com (Rich Siegel)
  1204. Subject:  THINK C Libraries in THINK Pascal Projects
  1205. Date: 20 Feb 92 21:44:41 GMT
  1206. Organization: Symantec Language Products Group
  1207.  
  1208. In article <743@cogsci.ucsd.EDU> costin@cogsci.ucsd.EDU (Dan Costin) writes:
  1209. >I'm trying to use a library I created with Think C in a Think Pascal
  1210. >project.  Is this possible?  What are the rules?
  1211.  
  1212. The rules are:
  1213.  
  1214. 1) Any Pascal-callable entry point should be declared 'pascal'.
  1215.  
  1216. 2) It's best not to use ANSI library code, because of naming and runtime
  1217. architecture conflicts. If you need certain portions (such as the string
  1218. routines), you can add the appropriate ANSI source file (e.g. "str.c") to
  1219. the C project that you're using to build the library.
  1220.  
  1221. 3) It's not necessary to include the MacTraps or MacTraps2 libraries in
  1222. the C library's project. THINK Pascal's "Interface.o" has the necessary
  1223. ROM glue code in it.
  1224.  
  1225. 4) To prepare a library with CtoPstr and PtoCstr in it, do the following:
  1226.         - make a duplicate of your MacTraps project, called "CPStr".
  1227.         - open this duplicate project in THINK C
  1228.         - use "Remove" to remove all of the entries EXCEPT "CPStr.Lib"
  1229.         - use "Build Library" to build a library
  1230.         - add the resulting library to your Pascal project (this avoids
  1231.          duplicate definitions when you have multiple C projects that
  1232.         might use CtoPstr).
  1233.  
  1234. 5) Make sure that the "external" pascal declarations for the C libraries
  1235. EXACTLY match the corresponding C declarations.
  1236.  
  1237. > missing NewPtrSys
  1238.  
  1239. According to C 5.0's <Memory.h>, NewPtrSys() is an inline, so no external
  1240. reference is made. In THINK Pascal, NewPtrSys is in the glue, but since
  1241. you're using an inline, it doesn't matter. As an alternative, place the
  1242. following declaration in the file that calls NewPtrSys():
  1243.  
  1244. extern pascal Ptr NewPtrSys(long);
  1245.  
  1246. ...and see if that makes a difference.
  1247.  
  1248. >So why am I bombing?
  1249.  
  1250. Have you stepped through it in MacsBug to see where it's crashing and why?
  1251. There are no magic answers to problems like this, and sometimes it's necessary
  1252. to use a machine-level debugger to diagnose exactly what the problem is.
  1253.  
  1254. R.
  1255.  
  1256. -- 
  1257. - ---------------------------------------------------------------------
  1258. Rich Siegel                              Internet: siegel@world.std.com
  1259. Senior Software Engineer                 Applelink: SIEGEL
  1260. Symantec Languages Group
  1261.  
  1262.  
  1263.  
  1264. ---------------------------
  1265.  
  1266. End of C.S.M.P. Digest
  1267. **********************
  1268.